//编写子函数，实现具体业务
//参数1创建的socket对象
//参数2命令
//参数3文件名
//返回值 成功返回0，失败返回-1
//
#include"../include/p.h"
int do_work(int newfd,char *cmd,char *filename)
{
	if(strncmp(cmd,"put",3)==0)
	{
		s_Download(newfd,filename);
	}
	if(strncmp(cmd,"get",3)==0)
	{
		s_Upload(newfd,filename);
	}
	if(strncmp(cmd,"register",8)==0)
	{
		//注册功能
	}
	if(strncmp(cmd,"login",5)==0)
	{
		//登录功能
	}


	return 0;
}
